
var lhnTrack=lhnTrackingEnabled;
var blhnInstalled=0;
if (typeof lhnInstalled !='undefined'){lhnTrack='f';blhnInstalled=1;}
var lhnInstalled=1;
var InviteRepeats;
var zbrepeat=1;
var bInvited=0;
var bLHNOnline=0;
InviteRepeats=0;

function pausecomp(millis) 
{
zadate = new Date();
var zcurDate = null;

do { var zcurDate = new Date(); } 
while(zcurDate-zadate < millis);
} 

if (blhnInstalled==0)
{
var lhnjava;
var lhnreg = new RegExp('/');
var lhnreferrer = (document.referrer.length>400)?escape(document.referrer.substring(0,400)):escape(document.referrer);//escape(document.referrer);

var lhnpagetitle=(document.title.length>100)?escape(document.title.substring(0,100)):escape(document.title);
var srnd;
//var lhnsShortPath = escape(window.location.pathname);
var lhnsPath=(this.location.length>400)?escape(this.location.substring(0,600)):escape(this.location);//escape(this.location);
if ( !(navigator.javaEnabled()) ) {
  lhnjava="No" ;
} else {
  lhnjava="Yes" ;
}
var lhnrand_no = Math.random();


var lhnsRes;
var lhnsDepth;
if (window.screen) {
lhnsRes=screen.width + 'x' + screen.height;
lhnsDepth=screen.colorDepth;
}
}


function WriteLHNMessage(lhnmes,AutoInvite)
{
	var LHpopwhat=(AutoInvite==1)?"OpenLHNChat();":"Invitation();";
	var url=(document.location.protocol=='https:')?"<img style='position:absolute;top:-5000px;left:-5000px;' width='1' height='1' src='https://www.livehelpnow.net/lhn/jsutil/showninvitationmessage.aspx?iplhnid=123.21.98.255|14773|11/3/2013 8:45:05 AM' />":"<img style='position:absolute;top:-5000px;left:-5000px;' width='1' height='1' src='http://www.livehelpnow.net/lhn/jsutil/showninvitationmessage.aspx?iplhnid=123.21.98.255|14773|11/3/2013 8:45:05 AM' />";

	if (zCustomInvitation==''){
		document.getElementById("Zsleft").innerHTML = "<div class=\"LVchat_window_top\"></div><div class=\"LVchat_window_middle\"><div class=\"LVchat_window_middle_inner\" style=\"background: !important;\"><div class=\"LVchat_window_blik\"><div class=\"LVchat_window_message_top\"></div><div class=\"LVchat_window_message_bottom\">"+lhnmes+"</div><div class=\"LVchat_window_buttons\"><a onclick=\"CloseLHNInvite();return false;\" href=\"#\"></a><a onclick=\"" + LHpopwhat + "return false;\" href=\"#\"></a><div style=\"clear:both;width:1px;height:1px;overflow:hidden;\"></div></div></div></div></div><div class=\"LVchat_window_bottom\"></div>"+url;
		}
	else
		{
		document.getElementById("Zsleft").innerHTML = lhnmes+url;
		}
	

	if (Zstepx==-10)
		{
		Zslide();
		if (Zmutechime != '1')
		{
			if (navigator.userAgent.toLowerCase().indexOf('msie')>0)
			{
			var body = document.getElementsByTagName("body");
			var divE = document.createElement('bgsound');
			divE.id = "LHNSound";
			divE.style.position = "absolute";
			divE.style.left = "0px";
			divE.style.top = "0px";
			divE.hidden = "true";
			divE.src=lhnJsHost + 'www.livehelpnow.net/lhn/sounds/beep0.wav';
			divE.autostart="true";
			divE.loop="0"
			body[0].appendChild(divE);
			setTimeout("document.getElementsByTagName('body')[0].removeChild(document.getElementById('LHNSound'))", 2000);
			}
			else
			{
				var body = document.getElementsByTagName("body");
                var divE = document.createElement('audio');
                divE.setAttribute("controls",'');
                divE.setAttribute("autoplay",'');
                divE.id = "zaBellSound";
				divE.style.position = "absolute";
				divE.style.left = "-300px";
				divE.style.top = "-300px";
				divE.style.width = "0";
				divE.style.height = "0";
				divE.visible = "false";

                var divESource = document.createElement('source');
                divESource.src=lhnJsHost + 'www.livehelpnow.net/lhn/sounds/beep0.wav';
                divESource.type="audio/wav";
                divE.appendChild(divESource);

                body[0].appendChild(divE);

                setTimeout("document.getElementsByTagName('body')[0].removeChild(document.getElementById('zaBellSound'))", 2000);
			}
		}
		}
   

}

var lhnWin;
function OpenLHNChat()
{
if(typeof CustomOpenLHNChat == 'function') { 
CustomOpenLHNChat();
return false;
}

if (typeof lhnWin !== 'undefined'){
if (!lhnWin.closed){
    lhnWin.blur();
    setTimeout(lhnWin.focus(), 10);
    return false;
    }
}

var wleft = (screen.width - 500-32) / 2;
var wtop = (screen.height - 500-96) / 2;
var sScrollbars=(bLHNOnline==0)?"yes":"no";
<!--HTTPS OR NOT: RELEASENOTE-->
	if (document.location.protocol=='https:' || (typeof lhnJsHost !='undefined' && lhnJsHost == "https://"))
	{
		lhnWin=window.open('https://www.livehelpnow.net/lhn/livechatvisitor.aspx?zzwindow=' + lhnWindowN + '&lhnid=' + 14773 + '&d=' + 0,'lhnchat','left=' + wleft + ',top=' + wtop + ',width=500,height=500,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=' + sScrollbars + ',copyhistory=no,resizable=yes');
	}
	else
	{
		lhnWin=window.open('http://www.livehelpnow.net/lhn/livechatvisitor.aspx?zzwindow=' + lhnWindowN + '&lhnid=' + 14773 + '&d=' + 0,'lhnchat','left=' + wleft + ',top=' + wtop + ',width=500,height=500,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=' + sScrollbars + ',copyhistory=no,resizable=yes');
	}

    if (typeof Zstepx != 'undefined')
	{
    if (Zstepx==10) 
    {
    Zslide();
    }
    }
}
function Invitation()
{
var wleft = (screen.width - 500-32) / 2;
var wtop = (screen.height - 500-96) / 2;
	if (document.location.protocol=='https:')
	{
		window.open('https://www.livehelpnow.net/lhn/livechat.aspx?fullname=Visitor&email=unknown_email@livehelpnow.com&lhnmes=lhn&zzwindow=' + lhnWindowN + '&lhnid=' + 14773,'lhnchat','left=' + wleft + ',top=' + wtop + ',width=500,height=500,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,copyhistory=no,resizable=yes');
	}
	else
	{
	    window.open('http://www.livehelpnow.net/lhn/livechat.aspx?fullname=Visitor&email=unknown_email@livehelpnow.net&lhnmes=lhn&zzwindow=' + lhnWindowN + '&lhnid=' + 14773,'lhnchat','left=' + wleft + ',top=' + wtop + ',width=500,height=500,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,copyhistory=no,resizable=yes');
	}
   
    Zslide();
}
//width="' + lhnButtonWidth + '" height="' + lhnButtonHeight + '"
var lhnDisplayStyle = ((lhnButtonN == '-1') ? "style=\"display:none\" " : ""); 
//document.getElementById("lhnChatButton").innerHTML='<a href="#" ' + lhnDisplayStyle +'onclick="OpenLHNChat();return false;"><img alt="Live help" id="lhnchatimg" border="0" nocache src="' + lhnJsHost + 'www.livehelpnow.net/lhn/functions/imageserver.ashx?lhnid=' + lhnAccountN + '&java=' + lhnjava + '&zimg=' + lhnButtonN + '&sres=' + lhnsRes + '&sdepth=' + lhnsDepth + '&custom1=' + lhnCustom1 + '&custom2=' + lhnCustom2 + '&custom3=' + lhnCustom3 + '&t=' + lhnTrack + '&d=' + lhnDepartmentN +'&rndstr=' + lhnrand_no + '&referrer=' + lhnreferrer + '&pagetitle=' + lhnpagetitle + '&pageurl=' + lhnsPath + '"></a>';

var LHNimg = new Image();
LHNimg.onload = function() {
    document.getElementById("lhnChatButton").innerHTML='<a href="#" ' + lhnDisplayStyle +' onclick="OpenLHNChat();return false;" id="aLHNBTN"></a>';
    document.getElementById("aLHNBTN").appendChild(LHNimg);
    if (typeof window.LHN_button_onLoad == "function") {
         window.LHN_button_onLoad();
    }
}
LHNimg.id = "lhnchatimg";
LHNimg.border = "0";
LHNimg.alt="Live help";
LHNimg.src = lhnJsHost + 'www.livehelpnow.net/lhn/functions/imageserver.ashx?lhnid=' + lhnAccountN + '&java=' + lhnjava + '&zimg=' + lhnButtonN + '&sres=' + lhnsRes + '&sdepth=' + lhnsDepth + '&custom1=' + lhnCustom1 + '&custom2=' + lhnCustom2 + '&custom3=' + lhnCustom3 + '&t=' + lhnTrack + '&d=' + lhnDepartmentN +'&rndstr=' + lhnrand_no + '&referrer=' + lhnreferrer + '&pagetitle=' + lhnpagetitle + '&pageurl=' + lhnsPath;